

#ifndef __FruitCrush__StartPromptView__
#define __FruitCrush__StartPromptView__
#include "cocos2d.h"
#include "LocalizedStringGetter.h"
#include "editor-support/cocostudio/CCSGUIReader.h"
#include "ui/CocosGUI.h"
using namespace cocos2d::ui;
using namespace cocostudio;

USING_NS_CC;

typedef std::function<void(Ref*)> StartPromptViewCallback;

class StartPromptView : public cocos2d::Layer
{
public:
    static cocos2d::Scene* createScene();
    CREATE_FUNC(StartPromptView);
    virtual bool init() override;
    void setLevel(int level);
    void show();
    void setCallback(const StartPromptViewCallback& callback);
protected:
    StartPromptViewCallback _callback;
private:

    int currentLevel;
    float win_height;
    float win_width;
    Widget* UI;
    Widget* promptFrame;
    Label* promptTitle;
    Label* promptHint;
    Sprite* promptImg;
    void dismiss();
    std::string getTitle(int level);
    std::string getHint(int level);
    void setImg(int level);
    void addImgChild(Sprite* s);


};

#endif
